﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace TinyBug.Models.Infrastructure
{
	public class TinyBugDbInitializer : DropCreateDatabaseIfModelChanges<TinyBugDbContext>
	{
		protected override void Seed(TinyBugDbContext context)
		{
			context.Users.Add(new User
			{
				Username = "admin",
				Firstname = "Administrador",
				Lastname = "_"
			});

			context.Projects.Add(new Project
			{
				Code = "DTV01",
				Name = "Asignador Único 1.0",
				Owner = context.Users.Find("admin")
			});
		}
	}
}